<template>
<div class="login">
    <div class="menu-bg">
          <div class="contain">
            <div class="logo-wrapper">
              <router-link to="/home">
                <img src="../../assets/images/logo.svg"/>
              </router-link>
            </div>
          </div>
      </div>
      <div class="login-box">
          <div class="center-box">
            <login-box></login-box>
          </div>
      </div>
  </div>
</template>

<script>
import LoginBox from "./components/LoginBox"
export default {
  name: 'Login',
  components: {
    LoginBox
  },
  data () {
    return {
    }
  },
  //设置菜单栏是否显示
  created() {
    this.$store.state.isNavShow = false;
    // this.$store.commit("setNavDisplay", false);
  },
  //设置菜单栏选中状态
  beforeRouteEnter(to, from, next) {
    next(vm => {
      vm.$emit("setNav", to.meta.index);
    });
  },
  mounted() {
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped="" type="text/css">
#app{
  width: 100%;
  height: 100% !important;
}
.login{
  position: fixed;
  width: 100%;
  height: 100%;
  background: url(../../assets/images/img3.jpg) center center repeat;
  background-attachment: fixed;
  background-size: cover;
  .menu-bg{
    clear: both;
  }
  .login-box{
      width: 100%;
      height: calc(100% - 60px);
      display: flex;
      align-items: center; /*垂直居中*/
      justify-content: center;  /*左右居中*/
      flex-wrap: wrap;    
	    flex-direction: column; /*决定主轴的方向 row(默认)|row-reverse|column|column-reverse*/
      .center-box{
          width: 500px;
          height: 500px;
          max-width: 80%;
          background: #000;
      }
  }
}
</style>
